import javax.swing.tree.TreeNode;

public class Test {

    public int leafCount;
    /**
     * 获取叶子节点的个数 - 遍历思路
     * @param root
     */
    /*public void getLeafNodeCount(TreeNode root) {
        if(root == null) {
            return;
        }
        if(root.right == null && root.left == null) {
            leafCount++;
        }
        getLeafNodeCount(root.left);
        getLeafNodeCount(root.right);
    }

    public int getLeafNodeCount2(TreeNode root) {
        if(root == null) {
            return 0;
        }
        if (root.left == null && root.right == null) {
            return 1;
        }
        else {
            return getLeafNodeCount(root.left) + getLeafNodeCount(root.right);
        }
    }

    public TreeNode find(TreeNode root,int key){
       if (root == null) {
            return null;
        }
        if (root.val == key) {
            return root;
        }
        find(root.left,key);
        find(root.right,key);
    }*/


    public static void main(String[] args) {

    }
}